<!-- DOWNLOADED FROM WWW.SCRIPTGATES.COM -->
<!DOCTYPE html>
<html>
<head>
<?php $this->load->view('js-css-view') ?>
 
   
<script type="text/javascript">
    jQuery(document).ready(function(){
      
        
        jQuery('#dp1').datepicker({
				format: 'dd-mm-yyyy'
			});   
    	   
        
    });
    

</script>






        

</head>

<body>
<div class="mainwrapper">    
    <div class="header">
        <?php $this->load->view('header-view'); ?>
    </div>    
    <div class="leftpanel">
         <?php $this->load->view('menu-view'); ?>
    </div><!-- leftpanel -->
    
    <div class="rightpanel">        
        <ul class="breadcrumbs">
            <li><a href="<?php echo base_url() ?><?php echo $link; ?>"><i class="iconfa-file"></i></a> <span class="separator"></span></li>
            <li><?php echo $current; ?> >> Tambah</li>            
        </ul>
        
      
        
        <div class="maincontent">
            <div class="maincontentinner">
                <div class="row-fluid">
                   
                    <div id="dashboard-left" class="span12">
                 
                        <h4 class="widgettitle">Tambah Data User</h4>
              
             <form action="<?php echo base_url() ?>user/processInsert" class="stdform" method="POST" enctype=multipart/form-data>
     <div class="modal-footer">
        <a href="<?php echo base_url() ?>user" class="btn">Cancel</a>
        <input type="submit" class="btn btn-primary" value="S A V E"/>
    </div>                    
    <div class="modal-body">
      
        <?php if($avaible=='usernot') { ?>
        <div class="alert alert-danger">
                              <p style="margin: 8px 0">Sory, Username Not Avaible. Please Try Other Username</p>
                        </div>
        <?php } 
        
        elseif($avaible=='emailnot') { ?>
        
        <div class="alert alert-danger">
                              <p style="margin: 8px 0">Sory, Email Already Register. Please Try Other Email</p>
                        </div>
        <?php } 
        elseif($avaible=='bothnot') { ?>
        
        <div class="alert alert-danger">
                              <p style="margin: 8px 0">Sory, Email & Username Already Register. Please Try Others</p>
                        </div>
        <?php } ?>
   
        <p>  <label>Username</label>  <span class="field"><input type="text" placeholder="Username" class="input-xlarge" name="username" required></span> </p>
        
        <p>  <label>Role</label>  <span class="field">
                <select class="uniformselect" name="id_role">
            <?php foreach($role as $row) { ?>                    
                    <option value="<?php echo $row['id'] ?>"><?php echo $row['role'] ?></option>
            <?php } ?>
                </select>
            
            </span> </p>
        <p>  <label>Password</label>  <span class="field"><input type="password" required id="password" class="input-xlarge" name="password"></span> </p>
        <p>  <label>Confirm Password</label>  <span class="field"><input type="password" required id="confirm_password" class="input-xlarge" name="conf" oninput="check(this)"></span> </p>
        <p>  <label>Email</label>  <span class="field"><input type="email" required placeholder="email" class="input-xlarge" name="email"></span> </p>
        <p>  <label>About</label>  <span class="field"> <textarea name="about"> </textarea>  </span> </p>
      
        <p>
                <label>Photo (.jpg/.png) :</label>
                <input type="file" placeholder="Image Image" class="input-xlarge" name="path_image">
            </p>
    </div>
    
   </form>
                    
                        
                        
                        
                    </div><!--span8-->
              
                </div><!--row-fluid-->
                
            
                <div class="footer">
                    <?php $this->load->view('footer-view'); ?>
                    
                    <script language='javascript' type='text/javascript'>
function check(input) {
    if (input.value != document.getElementById('password').value) {
        input.setCustomValidity('The two passwords must match.');
    } else {
        // input is valid -- reset the error message
        input.setCustomValidity('');
   }
}
</script>
                </div><!--footer-->
                
            </div><!--maincontentinner-->
        </div><!--maincontent-->
        
    </div><!--rightpanel-->
    
</div><!--mainwrapper-->

</body>
</html>